import os
import rtconfig
from building import *


cwd = GetCurrentDir()

# add general drivers
src = Split('''
motor_task.c
''')

path =  [cwd]
path += [cwd + '/DJI']
path += [cwd + '/DAMIAO']
path += [cwd + '/SteadyWin']
group = DefineGroup('motor', src, depend = [''], CPPPATH = path)

list = os.listdir(cwd)
for item in list:
    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
        group = group + SConscript(os.path.join(item, 'SConscript'))


Return('group')